import java.util.Scanner;
import java.math.BigInteger;

public class Array_1_6_13 {
    public static void main(String[] args) {
        BigInteger c;
        Scanner input=new Scanner(System.in);
        c=input.nextBigInteger();
        int flag=0;
        for (int i = 2; i <10 ; i++) {
            if((c.mod(BigInteger.valueOf(i))).intValue()==0){
                System.out.print(i+" ");
                flag++;
            }
        }
        if(flag==0)
            System.out.println("none");
    }
}